Method and device for image processing

ABSTRACT

Embodiments provide a method for processing a first image based on a second image, wherein each pixel in the first image has a plurality of color components and has a corresponding pixel in the second image, and wherein each value of a color component in the first image corresponds to a value of a color component in the second image. The method may include deciding, for each color component of a pixel in the first image, whether to modify the value of the color component dependent on a predetermined criterion. The method may further include determining a similarity index between the pixel in the first image and the corresponding pixel in the second image based on, for each color component of the pixel, the value of the color component of the pixel, or if it is decided that the value of the color component of the pixel is to be modified, the corresponding value of the color component in the second image.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application claims the benefit of the U.S. provisional patent application 61/367,489 filed on 26 Jul. 2010, the entire contents of which are incorporated herein by reference for all purposes.

TECHNICAL FIELD

Embodiments relate generally to signal processing. Specifically, embodiments relate to a method and a device for image processing.

BACKGROUND

Many natural scenes have wider dynamic ranges than those that can be recorded by conventional low dynamic range (LDR) imaging systems. An LDR image with small exposure time is under-exposed in the dark scene regions but captures the bright areas well. In contrast, an LDR image with large exposure time is saturated in the bright scene regions but captures the dark areas well. In other words, one LDR image is not able to represent the whole scene. A high dynamic range (HDR) image can be produced to represent the whole scene by sequentially capturing multiple differently exposed LDR images using normal cameras.

When an HDR image is synthesized for a scene by using multiple differently exposed LDR images, moving objects in the LDR images may cause ghosting artifacts in the final HDR image. This is often encountered in outdoor settings, wherein moving people, bus, clouds or trees waving, etc. may be captured as moving objects. To remove ghosting artifacts due to moving objects in the scene, the pixels of all LDR images are required to be properly classified into valid and invalid, and only valid pixels are used to generate the HDR image. Due to sensor and electronic noises as well as different exposures in the input LDR images, it is challenging to detect moving objects in the LDR images.

One approach is based on camera response functions (CRF) to remove ghosting artifacts. The predicted value for a pixel in an image can be computed by using the CRFs, the co-located pixel value in its reference image and their exposure times. The pixel is marked as valid if it is well approximated by the predicted value. Otherwise, it is marked as invalid in an error map. The schemes based on CRF are, however, sensitive to the estimate error of CRFs.

Another approach is based on the feature that local entropy is usually not changed much with respect to the exposure times. The local entropy is computed, and all pixels with local entropy variation larger than a threshold may be marked as invalid in an error map. Although the local entropy based method is not sensitive to the estimation error of CRFs, it is not suitable for a situation when two image regions share the same structure but with different intensity.

In another aspect, the invalid regions are usually patched by only using pixels from one single LDR image. Since moving objects usually belong to invalid regions, the dynamic ranges of moving objects in the synthesized HDR image are reduced when their dynamic ranges are inherently high.

It is thus desired to provide a movement detection scheme which is robust with respect to different exposures and variation among pixels caused by sensor and electronic noises, for the synthesis of an HDR image via a set of differently exposed LDR images.

It is also desired to provide a method to better preserve the dynamic range of moving objects in the synthesized HDR image.

SUMMARY

Various embodiments provide a method for processing a first image based on a second image, wherein each pixel in the first image has a plurality of color components and has a corresponding pixel in the second image, and wherein each value of a color component in the first image corresponds to a value of a color component in the second image. The method may include deciding, for each color component of a pixel in the first image, whether to modify the value of the color component dependent on a predetermined criterion. The method may further include determining a similarity index between the pixel in the first image and the corresponding pixel in the second image based on, for each color component of the pixel, the value of the color component of the pixel, or if it is decided that the value of the color component of the pixel is to be modified, the corresponding value of the color component in the second image.

BRIEF DESCRIPTION OF THE DRAWINGS

In the drawings, like reference characters generally refer to the same parts throughout the different views. The drawings are not necessarily to scale, emphasis instead generally being placed upon illustrating the principles of the invention. In the following description, various embodiments are described with reference to the following drawings, in which:

FIG. 1 shows a flow diagram for synthesis of a HDR image according to an embodiment.

FIG. 2 shows a flow diagram for image processing according to various embodiments.

FIG. 3 shows the processing order of a sequence of images according to an embodiment.

FIG. 4 shows a schematic diagram of an image processing device according to various embodiments.

FIG. 5 shows an image sequence with five different exposure time.

FIG. 6 shows experimental results of a bi-directional similarity detection method of an embodiment and a uni-directional similarity detection method carried out on the image sequence of FIG. 5.

FIG. 7 shows an image sequence with seven different exposure time.

FIG. 8 shows experimental results of using an adaptive threshold according to an embodiment and using a fixed threshold for movement detection.

FIG. 9 shows experimental result of an synthesized HDR image based on the image sequence of FIG. 5.

FIG. 10 shows an HDR video generated by the method of an embodiment.

FIG. 11 shows a LDR image sequence with eleven different exposure time.

FIG. 12 shows experimental results of different methods for ghosting artifacts removal.

FIG. 13 shows HDR images generated by PHOTOMATIX and a method of an embodiment.

DESCRIPTION

Various embodiments provide a method for image processing. Various features described below in the context of the image processing method may analogously hold true for the corresponding device, and vice versa.

One embodiment is directed to a method for processing a first image based on a second image, wherein each pixel in the first image has a plurality of color components and has a corresponding pixel in the second image, and wherein each value of a color component in the first image corresponds to a value of a color component in the second image. The method may include deciding, for each color component of a pixel in the first image, whether to modify the value of the color component dependent on a predetermined criterion. The method may further include determining a similarity index between the pixel in the first image and the corresponding pixel in the second image based on, for each color component of the pixel, the value of the color component of the pixel, or if it is decided that the value of the color component of the pixel is to be modified, the corresponding value of the color component in the second image.

In an embodiment, each pixel in the first image and its corresponding pixel in the second image are co-located. The pixel in the first image and its corresponding pixel in the second image are co-located if these two pixels are at the same spatial position in the first and the second images.

In an embodiment, the first image and the second image may be part of a sequence of images with different exposure time, e.g. a sequence of low dynamic range images. The second image may also be referred to as a reference image of the first image.

In an embodiment, the plurality of color components may include a red color component, a green color component, and a blue color component. In another embodiment, the plurality of color components may include other types of color components in accordance with other color space, for example, may include a cyan color component, a magenta color component and a yellow color component if CMYK (cyan, magenta, yellow and key) color space is used.

In an embodiment, the method further includes deciding, for each color component of the corresponding pixel in the second image, whether to modify the value of the color component of the corresponding pixel dependent on a predetermined criterion, wherein each value of a color component in the second image corresponds to a value of a color component in the first image. The method may further include determining the similarity index between the pixel in the first image and the corresponding pixel in the second image based on, for each color component of the corresponding pixel, the value of the color component of the corresponding pixel, or if it is decided that the value of the color component of the corresponding pixel is to be modified, the corresponding value of the color component in the first image.

According to an embodiment, deciding whether to modify the value of the color component is dependent on the value of the color component of the pixel in the first image and the value of the color component of the corresponding pixel in the second image.

According to another embodiment, deciding whether to modify the value of the color component is dependent on a comparison of an exposure level of the color component of the pixel in the first image with an exposure level of the color component of the corresponding pixel in the second image.

In an embodiment, the exposure level of the color component of the pixel in the first image represents a deviation of the value of the color component of the pixel from a predetermined value, and the exposure level of the color component of the corresponding pixel in the second image represents a deviation of the value of the color component of the corresponding pixel from the predetermined value. The predetermined value is a middle value of a value range of the first image and the second image. For example, if the value range of the first image and the second image is [0, 255], the predetermined value may be determined to be the middle value 127.

According to an embodiment, the corresponding value of a color component in the second image is determined to correspond to the value of a color component in the first image based on an intensity mapping function from the first image to the second image, wherein the intensity mapping function is determined based on accumulated histograms of the first image and the second image. For example, the corresponding value of a color component in the second image may be determined to be a value which minimizes the difference between the accumulated histogram of the first image and the accumulated histogram of the second image.

Dependent on the determined similarity index, the pixel of the first image may be determined to be within or out of a moving object region.

Another embodiment is directed to a device for processing a first image based on a second image, wherein each pixel in the first image has a plurality of color components and has a corresponding pixel in the second image, and wherein each value of a color component in the first image corresponds to a value of a color component in the second image. The device may include a decider configured to decide, for each color component of a pixel in the first image, whether to modify the value of the color component dependent on a predetermined criterion. The device may further include a similarity index determiner configured to determine a similarity index between the pixel in the first image and the corresponding pixel in the second image based on, for each color component of the pixel, the value of the color component of the pixel, or if it is decided that the value of the color component of the pixel is to be modified, the corresponding value of the color component in the second image.

Another embodiment is directed to a method for processing a first image based on a second image, wherein the first image and the second image are part of a sequence of images captured with different exposure time. The method may include determining a similarity index between a pixel of the first image and a corresponding pixel of the second image, wherein the similarity index represents a degree of similarity between the pixel and the corresponding pixel. The method may include determining a threshold for the pixel dependent on at least one of exposure time of the first image, exposure time of the second image, a film speed for capturing the sequence of images, and an average exposure value of the sequence of images. The method may further include determining the pixel to be within or out of a moving object region dependent on a comparison of the determined similarity index with the determined threshold.

In an embodiment, the threshold for the pixel is determined dependent on an intensity value of the pixel in the first image and an intensity value of the corresponding pixel in the second image.

In another embodiment, the threshold for the pixel is determined dependent on an exposure level of the pixel in the first image and an exposure level of the corresponding pixel in the second image. The exposure level of the pixel in the first image may represent a deviation of the intensity value of the pixel from a predetermined value, and the exposure level of the corresponding pixel in the second image may represent a deviation of the intensity value of the corresponding pixel from the predetermined value. The predetermined value is a middle value of an intensity value range of the first image and the second image.

In an embodiment, determining the similarity index between the pixel of the first image and the corresponding pixel of the second image may include deciding, for each color component of the pixel in the first image, whether to modify the value of the color component dependent on a predetermined criterion, wherein each value of a color component in the first image corresponds to a value of a color component in the second image. The determination of the similarity index may further include determining the similarity index between the pixel in the first image and the corresponding pixel in the second image based on, for each color component of the pixel, the value of the color component of the pixel, or if it is decided that the value of the color component of the pixel is to be modified, the corresponding value of the color component in the second image.

Another embodiment is directed to a device for processing a first image based on a second image, wherein the first image and the second image are part of a sequence of images captured with different exposure time. The device may include a similarity index determiner configured to determine a similarity index between a pixel of the first image and a corresponding pixel of the second image, wherein the similarity index represents a degree of similarity between the pixel and the corresponding pixel. The device may further include a threshold determiner configured to determine a threshold for the pixel dependent on at least one of exposure time of the first image, exposure time of the second image, a film speed for capturing the sequence of images, and an average exposure value of the sequence of images. The device may further include a moving object region determiner configured to determine the pixel to be within or out of a moving object region dependent on a comparison of the determined similarity index with the determined threshold.

A further embodiment of the invention is directed to a method for processing a first image based on a second image, wherein the first image and the second image are part of a sequence of images captured with different exposure time. The method may include determining a similarity index between a pixel of the first image and a corresponding pixel of the second image, wherein the similarity index represents a degree of similarity between the pixel and the corresponding pixel. The method may further include determining a threshold for the pixel; and determining the pixel to be within or out of a moving object region dependent on a comparison of the determined similarity index with the determined threshold. If the pixel is determined to be within the moving object region, the method include determining a corresponding intensity value in the first image corresponding to an intensity value of the corresponding pixel in the second image or in a third image of the sequence of images based on an intensity mapping function from the second image to the first image, wherein the intensity mapping function is determined based on accumulated histograms of the first image and the second or the third image. The method further include determining an updated intensity value of the pixel in the first image to be the determined corresponding intensity value in the first image.

In one embodiment, if the pixel is determined to be within the moving object region, the corresponding intensity value in the first image may be determined based on the intensity mapping function from the second image to the first image. In other words, the intensity value of the corresponding pixel in the second image is mapped to the first image to determine the corresponding intensity value in the first image.

In another embodiment, if the pixel is determined to be within the moving object region, the method may further include determining whether the corresponding pixel of the second image and the corresponding pixel of the third image is similar. The corresponding pixels of the second image and the third image may be similar if their intensity values are similar. If the corresponding pixel of the second image is not similar to the corresponding pixel of the third image, the corresponding intensity value in the first image may be determined based on the intensity mapping function from the second image to the first image. In other words, the intensity value of the corresponding pixel in the second image is mapped to the first image to determine the corresponding intensity value in the first image.

If the corresponding pixel of the second image is similar to the corresponding pixel of the third image, the corresponding intensity value in the first image may be determined based on the intensity mapping function from the third image to the first image. In other words, the intensity value of the corresponding pixel in the third image is mapped to the first image to determine the corresponding intensity value in the first image.

According to an embodiment, the intensity mapping function may include minimizing a difference between the accumulated histogram of the first image and the accumulated histogram of the second image. The accumulated histogram of the first image may represent a number of pixels in the first image having an intensity value equal to or less than an intensity value to be determined, i.e. the corresponding intensity value in the first image. The accumulated histogram of the second image may represent a number of pixels in the second image having an intensity value equal to or less than the intensity value of the corresponding pixel in the second image. The accumulated histogram of the third image may represent a number of pixels in the third image having an intensity value equal to or less than the intensity value of the corresponding pixel in the third image.

In an embodiment, the intensity mapping function may be an arg min function, such that the corresponding intensity value in the first image is determined to be a value which minimizes the difference between the accumulated histogram of the second image (or the third image) up to the intensity value of the corresponding pixel in the second image (or the third image) and the accumulated histogram of the first image up to the corresponding intensity value in the first image.

In an embodiment, the method may further include applying an average filter to the determined corresponding intensity value using a plurality of neighboring pixels, wherein intensity values of the plurality of neighboring pixels have been processed and updated according to the method above.

According to an embodiment, if the pixel is determined to be out of the moving object region, the updated intensity value of the pixel is determined to be the intensity value of the pixel.

In the above embodiments, the corresponding intensity value in the first image and the updated intensity value of the pixel may be determined for each color component of the pixel separately.

A further embodiment is directed to a device for processing a first image based on a second image, wherein the first image and the second image are part of a sequence of images captured with different exposure time. The device include a similarity index determiner configured to determine a similarity index between a pixel of the first image and a corresponding pixel of the second image, wherein the similarity index represents a degree of similarity between the pixel and the corresponding pixel. The device may further include a threshold determiner configured to determine a threshold for the pixel, and a moving object region determiner configured to determine the pixel to be within or out of a moving object region dependent on a comparison of the determined similarity index with the determined threshold. The device may further include a corresponding intensity value determiner configured to determine a corresponding intensity value in the first image corresponding to an intensity value of the corresponding pixel in the second image based on an intensity mapping function from the second image to the first image, if the pixel is determined to be within the moving object region, wherein the intensity mapping function is determined based on accumulated histograms of the first image and the second image. The device may further include an updater configured to determine an updated intensity value of the pixel in the first image to be the determined corresponding intensity value in the first image.

In this context, the various image processing devices as described in the embodiments may include a memory which is for example used in the processing carried out by the image processing devices. A memory used in the embodiments may be a volatile memory, for example a DRAM (Dynamic Random Access Memory) or a non-volatile memory, for example a PROM (Programmable Read Only Memory), an EPROM (Erasable PROM), EEPROM (Electrically Erasable PROM), or a flash memory, e.g., a floating gate memory, a charge trapping memory, an MRAM (Magnetoresistive Random Access Memory) or a PCRAM (Phase Change Random Access Memory).

In this context, the image processing devices as described in this description may be or may include an image processing circuit.

In an embodiment, a “circuit” may be understood as any kind of a logic implementing entity, which may be special purpose circuitry or a processor executing software stored in a memory, firmware, or any combination thereof. Thus, in an embodiment, a “circuit” may be a hard-wired logic circuit or a programmable logic circuit such as a programmable processor, e.g. a microprocessor (e.g. a Complex Instruction Set Computer (CISC) processor or a Reduced Instruction Set Computer (RISC) processor). A “circuit” may also be a processor executing software, e.g. any kind of computer program, e.g. a computer program using a virtual machine code such as e.g. Java. Any other kind of implementation of the respective functions which will be described in more detail below may also be understood as a “circuit” in accordance with an alternative embodiment.

FIG. 1 shows a flow diagram for synthesis of a HDR image according to an embodiment.

A sequence of images 110, e.g. LDR images, with different exposure time is received as input images. The LDR images 110 may include moving objects.

The sequence of LDR images 110 may be processed at 120. For example, the processing of the LDR images 110 may include detecting moving objects in the LRD images 110, removing the moving objects in the LDR images 110, and generating updated LDR images 130. Various embodiments of the image processing method at 120 will be described in more detail below.

Based on the updated LDR images 130, a camera response function is estimated at 140.

Based on the updated LDR images 130 and the estimated camera response function, an HDR image 160 is synthesized at 150.

FIG. 2 shows a flow diagram for image processing according to various embodiments.

The image processing 120 in FIG. 1 may be performed in accordance with various embodiments described in FIG. 2, in order to process the LDR images to remove moving objects and to use the processed LDR images to synthesize the HDR image.

A sequence of LDR images 110 with different exposure time is received as input images. The sequence of LDR images 110 may be processed in a predetermined order, such that each time one LDR image (also referred to as a first image) is processed based on another LDR image (also referred to as a second image) selected as its reference image. The processing order of the sequence of LDR images 110 according to an embodiment is illustrated in FIG. 3.

According to the embodiment in FIG. 3, a sequence of images 110 indexed by 1, 2, . . . , k₀−1, k₀, k₀+1, . . . , n₀ is received as input images. A middle image denoted as Z_(k) ₀ may be selected as an initial reference image. All pixels in the initial reference image Z_(k) ₀ are marked as valid. Since the correlations between neighboring images are the strongest, the initial reference image Z_(k) ₀ may be selected as the reference image for the image Z_(k) ₀ ⁻¹ and also for the image Z_(k) ₀ ₊₁. Accordingly, a pixel at location p, Z_(k) ₀ (p), in the reference image Z_(k) ₀ may be used to determine whether the co-located pixels Z_(k) ₀ ⁻¹(p) and Z_(k) ₀ ₊₁(p) in the images Z_(k) ₀ ⁻¹ and Z_(k) ₀ ₊₁ are valid, i.e. within or out of a moving objection region, based on the similarity between the reference pixel Z_(k) ₀ (p) and the respective co-located pixels Z_(k) ₀ ⁻¹(p) and Z_(k) ₀ ₊₁(p). The intensity values of invalid pixels in the images Z_(k) ₀ ⁻¹(p) and Z_(k) ₀ ₊₁(p) may be corrected or updated to obtain an updated image Z_(k) ₀ ⁻¹(p)_(update) and an updated image Z_(k) ₀ ₊₁(p)_(update), in which the moving object is removed. The pixel Z_(k) ₀ (p) in the initial reference image Z_(k) ₀ may also be applied to detect whether pixels Z_(k)(p)(|k−k₀|>1) in other images is valid.

In another embodiment, as correlation between images Z_(k) ₀ and Z_(k) becomes weaker when the value of |k−k₀| is greater than 1, the reference image for each image to be processed is updated progressively. For example, after the image Z_(k) ₀ ⁻¹ is processed based on the initial reference image Z_(k) ₀ to obtain the updated image Z_(k) ₀ ⁻¹(p)_(update), the updated image Z_(k) ₀ ⁻¹(p)_(update) is used as the reference image for the next image Z_(k) ₀ ⁻² for the processing of the image Z_(k) ₀ ⁻².

According to an embodiment, the sequence of images may be processed in the order of Z_(k) ₀ ⁻¹, Z_(k) ₀ ⁻², . . . , Z₁, Z_(k) ₀ ₊₁, Z_(k) ₀ ₊₂, . . . , Z_(n) ₀ as demonstrated in FIG. 3.

For simplicity, for an image Z_(k) to be processed, its reference image is denoted as Z_(k′). The value of k′ corresponds to the exposure time Δt_(k) of image Z_(k′) and its value is updated as

$k^{\prime} = \left\{ \begin{matrix} {{k + 1};} & {{{if}\mspace{14mu} k} < k_{0}} \\ {{k - 1};} & {{{if}\mspace{14mu} k} > {k_{0}.}} \end{matrix} \right.$

In this context, the reference image denoted by Z_(k′) has been updated or processed to remove the moving object in the original image indexed by k′. If k′=k₀, Z_(k′)=Z_(k) ₀ .

A pixel in an image Z_(k)(k≠k₀) is marked as valid if it is similar to the co-located pixel in its reference image Z_(k′), and is marked as invalid otherwise.

When moving objects exist in the images Z_(k)(1≦k≦n₀), there may be ghosting artifacts in the final HDR image if images Z_(k)(1≦k≦n₀) are directly adopted to synthesize the final HDR image. To remove ghosting artifacts from the final HDR image, it is necessary to detect moving objects in images Z_(k)(1≦k≦n₀). In the following, the similarity determination between an image and its reference image, the similarity threshold determination, the moving object region determination, and the image updating according to various embodiments are described in detail. For simplicity, these embodiments are described in the context of a first image Z_(k) and a second image Z_(k′), and it is understood that the various embodiments may be applied to all the images in the sequence 110 in the order illustrated in FIG. 3 to obtain an updated or processed sequence of images.

Let Z_(k)(p)=[Z_(k,1)(p), Z_(k,2)(p), Z_(k,3)(p)]^(T) denote the image intensity vector of the position p in image Z_(k), wherein Z_(k,l)(p) represents the intensity value of a color component l, for example, for one of RGB (red, green, blue) color components or one of CMYK (cyan, magenta, yellow and key) color components. p represents a spatial position in the image Z_(k), k(1≦k≦n₀) indexes LDR images with different exposures and indexes over exposure time Δt_(k), and n₀ is the total number of input LDR images. These differently exposed LDR images may be referred to as a Wyckoff set of images, from which a HDR image may be generated. Let E_(k)(p)=[E_(k,1)(p), E_(k,2)(p), E_(k,3)(p)]^(T) denote the irradiance vector corresponding to Z_(k)(p). The relationship between E_(k)(p) and Z_(k)(p) is given as

Z _(k)(p)=ƒ(E _(k)(p)Δt _(k)+η_(q,k)(p))+η_(ƒ,k)(p),   (1)

wherein ƒ(·)(=[ƒ₁(·), ƒ₂(·), ƒ₃(·)]^(T)) represents the camera response function (CRF) vector, η_(q,k)(p)(=[η_(q,k,1)(p), η_(q,k,2)(p), η_(q,k,3)(p)]^(T)) represents sensor noise vector, and η_(ƒ,k)(p)(=[η_(ƒ,k,1)(p), η_(ƒ,k,2)(p), η_(ƒ,k,3)(p)]^(T)) represents electronics noise vector. ƒ_(l)(·) is monotonically increasing and its inverse function is denoted as ƒ_(l) ⁻¹(·), wherein l indexes the color component.

If there is no moving object in the scene and all LDR images are well aligned, equation (1) may become:

Z _(k)(p)=ƒ(E(p)Δt _(k)+η_(q,k)(p))+η_(ƒ,k)(p).   (2)

One feature of differently exposed LDR images Z_(k) and Z_(k′) is that there is possibly large intensity change between two co-located pixels Z_(k)(p) and Z_(k′)(p) due to different exposures.

Consider two pixels Z_(k)(p) and Z_(k)(p′) with the same color component value of Z_(k,l)(p) and Z_(k,l)(p′). The other feature of differently exposed images is that there is possibly large variation between the values of Z_(k′,l)(p) and Z_(k′,l)(p′) in the reference image due to the sensor and electronic noises. It is shown from Equation (1) that the values of Z_(k′,l)(p) and Z_(k′,l)(p′) are the same in the ideal case that there is neither sensor noise nor electronic noise. However, the values of η_(q,k,l)(p), η_(ƒ,k,l)(p′), η_(g,k′,l)(p) and η_(ƒ,k′,l)(p′) are usually not zeros. There is variation between the values of Z_(k′,l)(p) and Z_(k′,l)(p′) caused by the sensor noise. The variation could be large in the presence of the electronic noise, especially when Z_(k,l)(p) and Z_(k,l)(p′) are saturated or under-exposed.

At 210, a similarity index for differently exposed LDR images is determined according to various embodiments. The similarity index is determined based on an intensity mapping function (IMF), taking the above two features of differently exposed LDR images into consideration.

Since there is possible large intensity change between two co-located pixels Z_(k)(p) and Z_(k′)(p) in the first image Z_(k) and the second image Z_(k′), the original intensity values Z_(k)(p) and Z_(k′)(p) may not be directly used to determine the similarity index. According to an embodiment, a decision may be performed to determine whether the intensity values of the pixels Z_(k)(p) and Z_(k′)(p) need to be modified dependent on a predetermined criterion, so as to obtain a pair of updated pixels {hacek over (Z)}_(k)(p) and {hacek over (Z)}_(k′)(p). The similarity index for the pixels p is determined based on the updated intensity values {hacek over (Z)}_(k)(p) and {hacek over (Z)}_(k′)(p).

According to an embodiment, the decision may be performed for each color component Z_(k,l)(p) and Z_(k′,l)(p) of the pixels Z_(k)(p) and Z_(k′)(p). In an embodiment, the decision is performed dependent on the values of the color component Z_(k,l)(p) and Z_(k′,l)(p). In another embodiment, the decision is performed dependent on the exposure level of the color component Z_(k,l)(p) and the exposure level of the color component Z_(k′,l)(p).

According to an embodiment, the updated pair of pixels {hacek over (Z)}_(k)(p) and {hacek over (Z)}_(k′)(p) are generated by using a bi-directional mapping method as

$\begin{matrix} {{{\overset{\Cup}{Z}}_{k,l}(p)} = \left\{ {{\begin{matrix} {{Z_{k,l}(p)};} & {{{if}\mspace{14mu} {w\left( {Z_{k,l}(p)} \right)}} \leq {w\left( {Z_{k^{\prime},l}(p)} \right)}} \\ {{\Lambda_{k,k^{\prime},l}\left( {Z_{k,l}(p)} \right)};} & {{otherwise},} \end{matrix}{{\overset{\Cup}{Z}}_{k^{\prime},l}(p)}} = \left\{ \begin{matrix} {{\Lambda_{k^{\prime},k,l}\left( {Z_{k^{\prime},l}(p)} \right)};} & {{{if}\mspace{14mu} {w\left( {Z_{k,l}(p)} \right)}} \leq {w\left( {Z_{k^{\prime},l}(p)} \right)}} \\ {{Z_{k^{\prime},l}(p)};} & {{otherwise},} \end{matrix} \right.} \right.} & (3) \end{matrix}$

wherein ω(z) represents the exposure level of a pixel determined based on the intensity value z of the pixel, and Λ(z) represents an intensity mapping function as described in detail below. ω(z) may be determined in accordance with the following equation:

$\begin{matrix} {{w(z)} = \left\{ \begin{matrix} {{\left( {z + 1} \right)/128};} & {{{if}\mspace{14mu} z} \leq 127} \\ {{\left( {256 - z} \right)/128};} & {{otherwise}.} \end{matrix} \right.} & (4) \end{matrix}$

In the above embodiment, the exposure level ω(z) represents a deviation of the intensity value z from a predetermined value 127. The predetermined value is a middle value 127 of a value range [0, 255] in the above example of equation (4). In another embodiment wherein the intensity value of the first image and the second image is in a range of [0, 65535], the predetermined value may be determined to be 32767. In other embodiments wherein the first image and the second image are 32-bit or 64 bit images, the predetermined value may be determined to be the middle value of the intensity range accordingly.

In equation (3), Λ_(k,k′)(z) represents a corresponding value in the reference image Z_(k′) determined by mapping the intensity value z in the image Z_(k) to the reference image Z_(k′) based on an intensity mapping function (IMF), and may be referred to as a forward IMF. Similarly, Λ_(k′,k)(z) represents a corresponding value in the image Z_(k) determined by mapping the intensity value z in the reference image Z_(k′) to the image Z_(k) based on an intensity mapping function, and may be referred to as a backward IMF. Λ_(k,k′)(z) may be represented in the form of an IMF vector as Λ_(k,k′)(z)(=[Λ_(k,k′,1)(z), Λ_(k,k′,2)(z), Λ_(k,k′,3)(z)]^(T)), and Λ_(k′,k)(z) may be represented as an IMF vector Λ_(k′,k)(z)(=[Λ_(k′,k,1)(z), Λ_(k′,k,2)(z), Λ_(k′,k,3)(z)]^(T)), in which the corresponding values Λ_(k,k′,l)(z) and Λ_(k,k′,l)(z) of each color component l is determined.

According to an embodiment, the corresponding values Λ_(k,k′)(z) and Λ_(k′,k)(z) may be determined based on a respective intensity mapping function, wherein the intensity mapping function is determined based on accumulated histograms H_(k)(z) and H_(k′)(z) of the images Z_(k) and Z_(k′). The accumulated histogram H_(k)(z) represents the cardinality of a set including all the pixels of the image Z_(k) having an intensity value not larger than z, and H_(k′)(z) may be similarly determined.

In an embodiment, for the value z of a color component in the image Z_(k), the corresponding value Λ_(k,k′)(z) may be determined by finding an intensity value m which minimize the difference between H_(k)(z) and H_(k′)(m). In an exemplary embodiment, the corresponding value Λ_(k,k′)(z) may be determined in accordance with the equation below:

$\begin{matrix} {{{\Lambda_{k,k^{\prime},l}(z)} = {\arg \; {\min\limits_{m \in {\lbrack{{\Lambda_{k,k^{\prime},l}{({z - 1})}},255}\rbrack}}\left\{ {{{H_{k,l}(z)} - {H_{k^{\prime},l}(m)}}} \right\}}}},} & (5) \\ {{{H_{k,l}(z)} = {\sum\limits_{n = 0}^{z}{{\Theta_{k}(n)}}}},{{\Theta_{k}(z)} = \left\{ {{\left( {i,j} \right){Z_{k,l}\left( {i,j} \right)}} = z} \right\}}} & (6) \end{matrix}$

wherein |Θ_(k)(z)| is the cardinality of the set Θ_(k)(z), and represents the number of pixels in image Z_(k) with the value of Z_(k,l)(p) being equal to or less than z. Λ_(k,k′,l)(0)=0, and Λ_(k,k′,l)(z) is a monotonic increasing function of z.

The corresponding value Λ_(k′,k)(z) for the value z of a color component in the reference image Z_(k′) may be determined analogously.

The determination of the corresponding values Λ_(k,k′,l)(z) and Λ_(k,k′,l)(z) using the intensity mapping function according to equations (5) and (6) above does not require estimation of a camera response function, and thereby is robust to the estimation error of the camera response function.

According to the embodiments and equations (3)-(6) above, depending on a comparison of the exposure level of the color component Z_(k,l)(p) with the exposure level of the color component Z_(k′,l)(p), it is decided whether the value of the color component of the pixel Z_(k,l)(p) is to be modified. If yes, the updated value {hacek over (Z)}_(k)(p) is determined to be the corresponding value Λ_(k,k′,l)(z). If not, the updated value {hacek over (Z)}_(k)(p) is identical to the original value Z_(k,l)(p) of the pixel. The same decision process is performed to determine the updated value {hacek over (Z)}_(k′)(p) for the corresponding pixel in the reference image Z_(k′). Since the updated value {hacek over (Z)}_(k)(p) and {hacek over (Z)}_(k′)(p) can be determined using a more reliable value from either the original image or the reference image, the determination of the updated value is referred to as a bi-directional mapping method.

The updated values {hacek over (Z)}_(k)(p) and {hacek over (Z)}_(k′)(p) may be used to determine the similarity index at 210. In an embodiment, the similarity index S(Z_(k)(p), Z_(k′)(p)) may be determined in accordance with the following equation:

$\begin{matrix} {{S\left( {{Z_{k}(p)},{Z_{k^{\prime}}(p)}} \right)} = {\frac{{2{\sum\limits_{l = 1}^{3}{{{\overset{\Cup}{Z}}_{k,l}(p)}{{\overset{\Cup}{Z}}_{k^{\prime},l}(p)}}}} + 1}{{\sum\limits_{l = 1}^{3}\left\lbrack {{{\overset{\Cup}{Z}}_{k,l}^{2}(p)} + {{\overset{\Cup}{Z}}_{k^{\prime},l}^{2}(p)}} \right\rbrack} + 1}.}} & (7) \end{matrix}$

According to equation (7), the value of S(Z_(k)(p), Z_(k′)(p)) is 1 when {hacek over (Z)}_(k)(p) and {hacek over (Z)}_(k′,l)(p) are the same for each color component l. The more similar these two updated values {hacek over (Z)}_(k)(p) and {hacek over (Z)}_(k′)(p), the closer the value of S(Z_(k)(p), Z_(k′)(p)) to 1.

In another embodiment, the similarity index S_(l)(Z_(k)(p), Z_(k′)(p)) for each color component l may be determined in accordance with the following equation:

${S_{l}\left( {{Z_{k}(p)},{Z_{k^{\prime}}(p)}} \right)} = \frac{{2\; {{\overset{\Cup}{Z}}_{k,l}(p)}{{\overset{\Cup}{Z}}_{k^{\prime},l}(p)}} + 1}{{{\overset{\Cup}{Z}}_{k,l}^{2}(p)} + {{\overset{\Cup}{Z}}_{k^{\prime},l}^{2}(p)} + 1}$

Based on the IMF vectors Λ_(k,k′)(z) and Λ_(k′,k)(z) and the bi-directional mapping approach, the robustness of the similarity index of the various embodiments, e.g. in accordance with equation (7), may be significantly improved.

The updated values {hacek over (Z)}_(k)(p) and {hacek over (Z)}_(k′)(p) determined using Λ_(k,k′)(z) and Λ_(k′,k)(z) may unify the intensity values of Z_(k)(p) and Z_(k′)(p) before the determination of the similarity index.

Table 1 shows the intensity difference between original intensity values Z_(k)(p) and Z_(k′)(p) and between the updated intensity values {hacek over (Z)}_(k)(p) and {hacek over (Z)}_(k′)(p). The LDR image sequence shown in FIG. 5 and the first five images in FIG. 7 below are used to calculate

$\sum\limits_{p}{\frac{{Z_{k,l}(p)} + 1}{{Z_{k^{\prime},l}(p)} + 1}\mspace{14mu} {and}}$ ${\sum\limits_{p}{\frac{{{\overset{\Cup}{Z}}_{k,l}(p)} + 1}{{{\overset{\Cup}{Z}}_{k^{\prime},l}(p)} + 1}.}}\mspace{14mu}$

As shown in Table 1, the value of

$\sum\limits_{p}\frac{{Z_{k,1}(p)} + 1}{{Z_{k^{\prime},1}(p)} + 1}$

shows a large intensity change between Z_(k)(p) and Z_(k′)(p) of two differently exposed images.

Based on the updated intensity values {hacek over (Z)}_(k)(p) and {hacek over (Z)}_(k′)(p) determined using the IMF vectors Λ_(k,k′)(z) and Λ_(k′,k)(z), the intensities of the pixels in the two images are unified. Thus, the robustness of the similarity index of the various embodiments with respect to intensity changes between images Z_(k) and Z_(k′) due to different exposure times are improved. The IMF vectors can also be used to smooth the variation caused by the sensor noise. Therefore, the robustness of the similarity index of various embodiments with respect to the sensor noise is also improved. Meanwhile, a bi-directional mapping approach according to equation (3) is provided to improve the robustness of the similarity index with respect to the electronic noise.

In an illustrative example of a pair of pixels Z_(k)(p) and Z_(k′)(p), Z_(k,1)(p) and Z_(k,2)(p) are well exposed but Z_(k,3)(p) is saturated. Z_(k′,1)(p) and Z_(k′,2)(p) are under-exposed but Z_(k,3)(p) is well exposed. By using the proposed bi-directional mapping approach according to equations (3) and (4) above, pixels {hacek over (Z)}_(k)(p) and {hacek over (Z)}_(k′)(p) are determined to be [Λ_(k,k′,1)(Z_(k,1)(p)), Λ_(k,k′,2)(Z_(k,2)(p)), Z_(k,3)(p)]^(T) and [Z_(k′,1)(p), Z_(k′,2)(p), Λ_(k′,k,3)(Z_(k′,k,3)(p)]^(T), respectively. Accordingly, a more accurate similarity index is determined using {hacek over (Z)}_(k)(p) and {hacek over (Z)}_(k′)(p) in which each color component of the pair of pixels are evaluated, compared to using three pairs of (Z_(k)(p), Z_(k′)(p), (Z_(k)(p), Λ_(k′,k)(Z_(k′)(p))) and (Λ_(k,k′)(Z_(k)(p)), Z_(k′)(p)) in which the pair of pixels are evaluated at pixel level without considering each color component.

TABLE 1 ${Comparison}\mspace{14mu} {of}\mspace{14mu} \underset{p}{\;\sum}{\frac{{Z_{k,1}(p)} + 1}{{Z_{k^{\prime},1}(p)} + 1}\mspace{14mu} {and}\underset{p}{\mspace{14mu}\sum}\frac{{{\overset{\Cup}{Z}}_{k,1}(p)} + 1}{{{\overset{\Cup}{Z}}_{k^{\prime},1}(p)} + 1}}$       Image sequence $\frac{\Delta \; t_{k}}{\Delta \; t_{k^{\prime}}}$ $\sum\limits_{p}\frac{{Z_{k,1}(p)} + 1}{{Z_{k^{\prime},1}(p)} + 1}$ $\sum\limits_{p}\frac{{{\overset{\Cup}{Z}}_{k,1}(p)} + 1}{{{\overset{\Cup}{Z}}_{k^{\prime},1}(p)} + 1}$ In FIG. 5 2   1.5586 1.1127 4   2.7178 1.2499 8   4.3744 1.2107 16   7.1194 1.1671 In FIG. 7 1.5 1.1471 1.0107  1.5² 1.4592 1.0333  1.5³ 2.043 1.1229  1.5⁴ 3.4392 1.3636

The determined similarity index S(Z_(k)(p), Z_(k′)(p)) at 210 may be used to detect moving objects in a set of differently exposed LDR images for HDR imaging.

At 220, a threshold for a pixel in the image Z_(k) is determined using the LDR images 110. The threshold may be used to determined whether the pixel is valid or invalid, in other words, whether the pixel is within or out of a moving object region.

According to an embodiment, the threshold for the pixel is determined dependent on at least one of exposure time of the first image, exposure time of the second image, a film speed for capturing the sequence of images, and an average exposure value of the sequence of images. In another embodiment, the threshold for the pixel is also determined dependent on the exposure level of the pixel.

According to one embodiment, the threshold is determined based on the values of Z_(k,l)(p), Z_(k′,l)(p), exposure time Δt_(k) of the image Z_(k) and exposure time Δt_(k′) of the reference image Z_(k′) in accordance with the equation blow

$\begin{matrix} {{{Thr}_{k,k^{\prime}}(p)} = \frac{2\left( {1 - {\xi_{k,k^{\prime}}(p)}} \right)}{1 + \left( {1 - {\xi_{k,k^{\prime}}(p)}} \right)^{2}}} & (8) \end{matrix}$

wherein in one embodiment

${\xi_{k,k^{\prime}}(p)} = {\frac{15}{16} - {\max \left\{ {{ɛ\left( {{\overset{}{Z}}_{k,l}(p)} \right)},{ɛ\left( {{\overset{}{Z}}_{k^{\prime},l}(p)} \right)}} \right\} {\rho \left( {k,k^{\prime}} \right)}}}$ ${ɛ(z)} = \left\{ {{\begin{matrix} {{\frac{1}{128}\left( {1 - \frac{2z}{255}} \right)^{{(\frac{z}{17})}^{16}}};} & {{{if}\mspace{14mu} z} > 127} \\ {{\frac{1}{16}\left( {1 - \frac{2z}{255}} \right)^{{({50 - \frac{10z}{51}})}^{16}}};} & {otherwise} \end{matrix}{\rho \left( {k,k^{\prime}} \right)}} = \sqrt{\frac{\max \left( {{\Delta \; t_{k}},{\Delta \; t_{k^{\prime}}}} \right)}{\min \left( {{\Delta \; t_{k}},{\Delta \; t_{k^{\prime}}}} \right)}}} \right.$

wherein a threshold for each color component l is determined.

In another embodiment

${\xi_{k,k^{\prime}}(p)} = {\max\limits_{1 \leq l \leq 3}\left\{ {\alpha_{1} + {\max \left\{ {{ɛ\left( {{\overset{}{Z}}_{k,l}(p)} \right)},{ɛ\left( {{\overset{}{Z}}_{k^{\prime},l}(p)} \right)}} \right\} {\rho \left( {k,k^{\prime}} \right)}}} \right\}}$ ${ɛ(z)} = \left\{ {{\begin{matrix} {{\alpha_{2}\left( {1 - \frac{2z}{255}} \right)}^{{(\frac{13z}{255})}^{16}};} & {{{if}\mspace{14mu} z} > 127} \\ {{\alpha_{3}\left( {1 - \frac{2z}{255}} \right)}^{{({50 - \frac{10z}{51}})}^{16}};} & {otherwise} \end{matrix}{\rho \left( {k,k^{\prime}} \right)}} = {\sqrt{\frac{\max \left\{ {{\Delta \; t_{k}},{\Delta \; t_{k^{\prime}}}} \right\}}{\min \left\{ {{\Delta \; t_{k}},{\Delta \; t_{k^{\prime \;}}}} \right\}}}.}} \right.$

wherein ε(z) represents the exposure level determined based on the intensity value z. α_(i)(i=1,2,3) are three constants, which may be selected as ⅛, 1/64 and ¼, respectively. In other embodiments, the value of α_(i)(i=1,2,3) may be selected as other suitable values. For example, when there is overlapping between the same moving object in images with different exposure times or when the background and the moving object are similar, the value of α_(i)(i=1,2,3) may be selected as 1/16, 1/128 and 1/16, respectively. In this embodiment, a threshold is determined at the pixel level.

According to another embodiment, the threshold may be determined based on the values of Z_(k,l)(p), Z_(k′,l)(p), exposure time Δt_(k) of the image Z_(k), exposure time Δt_(k′) of the reference image Z_(k′), a value υ representing a film speed for capturing the sequence of images, and an average exposure value ĒV of the sequence of images, in accordance with the equation (8) above. In this embodiment,

$\begin{matrix} {{{{\xi_{k,k^{\prime}}(p)} = {\left( {\alpha_{1} + {\max\limits_{1 \leq l \leq 3}\left\{ {{ɛ\left( {{\overset{}{Z}}_{k,l}(p)} \right)},{ɛ\left( {{\overset{}{Z}}_{k^{\prime},l}(p)} \right)}} \right\}}} \right){h\left( {\frac{\Delta \; t_{a}^{M}}{\Delta \; t_{k,k}^{M}},\frac{\Delta \; t_{k,k^{\prime}}^{M}}{\Delta \; t_{k,k^{\prime \;}}^{m}},{\overset{\_}{E}V},v} \right)}}}\mspace{20mu} {ɛ(z)}} = \left\{ {{\begin{matrix} {0;} & {{{if}\mspace{14mu} z} > 127} \\ {{\alpha_{2}\left( {1 - \frac{2z}{255}} \right)}^{{({50 - \frac{10z}{51}})}^{16}};} & {{otherwise}.} \end{matrix}\mspace{20mu} {h\left( {x_{1},x_{2},x_{3},x_{4}} \right)}} = \left\{ \begin{matrix} {\frac{10\left( {x_{1}x_{4}} \right)^{1/8}}{\left( {10{\log_{2}\left( x_{2} \right)}} \right)^{1/4}{x_{3}}};} & {{{if}\mspace{14mu} x_{3}}\; < 10} \\ {\frac{\left( {x_{1}x_{4}} \right)^{1/8}}{\left( {\log_{2}\left( x_{2} \right)} \right)^{1/4}\left( {10x_{3}} \right)^{1/8}};} & {{otherwise}.} \end{matrix} \right.} \right.} & (9) \end{matrix}$

wherein α_(i)(i=1,2) are two constants, and may, in one example, be determined as 3/64 and 1/32, respectively. The values of α_(i)(i=1,2) may be determined as other suitable values in other embodiments. Δt_(α) ^(M) is the maximal value of all exposure times. Δt_(i,j) ^(M) and Δt_(i,j) ^(m) are the maximal and minimal values of two exposure times Δt_(i) and Δt_(j), respectively. υ representing a film speed for capturing the sequence of images, and may also be referred to as an ISO value. ĒV is the average exposure value of all LDR images and is defined as log₂(100ω²/(υΔ t)), wherein υ, ω and Δ t are the ISO value, the aperture value and the geometrical mean value of all exposure times, respectively.

According to above embodiment, the component

$\left( {\alpha_{1} + {\max\limits_{1 \leq l \leq 3}\left\{ {{ɛ\left( {{\overset{}{Z}}_{k,l}(p)} \right)},{ɛ\left( {{\overset{}{Z}}_{k^{\prime},l}(p)} \right)}} \right\}}} \right)$

forms the basis of the adaptive threshold in equation (9), while the component

$h\left( {\frac{\Delta \; t_{a}^{M}}{\Delta \; t_{k,k^{\prime}}^{M}},\frac{\Delta \; t_{k,k^{\prime}}^{M}}{\Delta \; t_{k,k^{\prime \;}}^{m}},{\overset{\_}{E}\; V},} \right.$

v) is provided to refine the adaptive threshold. There are two parts in the definition of ξ_(k,k′)(p) in equation (9). The former one,

$\alpha_{1}{h\left( {\frac{\Delta \; t_{a}^{M}}{\Delta \; t_{k,k^{\prime \;}}^{m}},\frac{\Delta \; t_{k,k^{\prime}}^{M}}{\Delta \; t_{k,k^{\prime \;}}^{m}},} \right.}$

ĒV, v), is to address the variation of image intensity values due to the sensor noise. The latter one,

$\max\limits_{1 \leq l \leq 3}{\left\{ {{ɛ\left( {{\overset{}{Z}}_{k,l}(p)} \right)},{ɛ\left( {{\overset{}{Z}}_{k^{\prime},l}(p)} \right)}} \right\} {h\left( {\frac{\Delta \; t_{a}^{M}}{\Delta \; t_{k,k^{\prime}}^{m}},\frac{\Delta \; t_{k,k^{\prime}}^{M}}{\Delta \; t_{k,k^{\prime \;}}^{M}},} \right.}}$

ĒV, v), is for the variation of image intensity values caused by the electronic noise.

The threshold may be determined for each color component in accordance with the above embodiments. The threshold for each color component may be used to compare with the similarity index determined for the respective color component. The threshold may also be determined at the pixel level in accordance with the above embodiments. The threshold at the pixel level may be used to compare with the similarity index determined for the pixel.

Based on the similarity index determined at 210 and the threshold determined at 220, one or more moving object regions may be determined at 230. The one or more moving object regions include pixels which are determined to be invalid according to various embodiments.

A pixel in the image Z_(k)(k≠k₀) may be marked as valid if it is similar to the co-located pixel in the reference image Z_(k′), i.e. if the similarity index S(Z_(k)(p), Z_(k′)(p)) is larger than the determined threshold. The set of valid pixels in image Z_(k) may be denoted as C_(k), which may be determined by using the intra pixel criterion: a pixel Z_(k)(p) is in the set C_(k) if the similarity between pixels Z_(k)(p) and Z_(k′)(p) is high. Otherwise, it belongs to a set C _(k) including invalid pixels in image Z_(k). C_(k) may be represented by

C _(k) ={p|S(Z _(k)(p), Z _(k′)(p))>Thr_(k,k′)(p)}  (10)

Here, C_(k) ₀ is composed of all pixels in image Z_(k) ₀ and

Z _((k) ₀ _(+1)′)(p)=Z _((k) ₀ _(−1)′)(p)=Z _(k) ₀ (p)   (11)

The comparison of the similarity index and the threshold in accordance with equation (10) may be performed at the pixel level or may be performed for each color component. For example, in an embodiment wherein a threshold is determined for each color component Z_(k,l)(p) of the pixel Z_(k)(p), the pixel Z_(k)(p) is determined to be out of the moving object regions if the similarities between all color components of the pixel and those of its co-located pixel in the second image are higher than the respective threshold.

The above detection results may be further used to initialize a weighting matrix ω_(k), wherein the value of ω_(k)(p) is 1 if Z_(k)(p) is valid and is 0 otherwise. To reduce the effects of noise, the value of ω_(k)(p) may be filtered over a window of 3×3.

The signal-to-noise ratio (SNR) of image Z_(k) may be represented by

$\begin{matrix} {{{{SNR}_{k}(p)} = {\Psi \left( \frac{{E^{2}(p)}\Delta \; t_{k}^{2}}{{{E(p)}\Delta \; t_{k}} + {\sigma_{read}^{2}(p)} + {\kappa \; {\sigma_{ADC}^{2}(p)}}} \right)}},} & (12) \end{matrix}$

wherein κ is the sensor gain, σ_(read)(p) is the noise from sensor readout, σ_(ADC)(p) is the combined effect of analog-to-digital conversion (ADC) including amplifier noise and quantization, and Ψ( ) is an unknown monotonic increasing function. It can be observed from equation (12) that σ_(read)(p) and σ_(ADC)(p) are dominant for a dark pixel p and E(p)Δt_(k) is dominant for a bright one.

After determining one or more moving object regions in image Z_(k) at 230, the image Z_(k) are updated at 240 to correct the invalid pixels within these regions.

As described above, if k=k₀, the image Z_(k) is the initial reference image and does not need to be updated. When k≠k₀, the invalid pixel in the image Z_(k) may be updated to be a corresponding intensity value in the image Z_(k). The corresponding intensity value in the image Z_(k) corresponds to an intensity value of the co-located pixel in the reference image Z_(k′), and is determined based on an intensity mapping function from the reference image Z_(k′) to the image Z_(k).

In an embodiment, the pixels of the image Z_(k) may be updated in accordance with the following equation:

$\begin{matrix} {{Z_{k}(p)}_{update} = \left\{ \begin{matrix} {{{\overset{\rightarrow}{Z}}_{k}(p)};} & {{{if}\mspace{14mu} p} \in {\overset{\_}{C}}_{k}} \\ {{Z_{k}(p)};} & {otherwise} \end{matrix} \right.} & (13) \end{matrix}$

From the above equation (13), it is seen that the value of valid pixels are maintained, while the value of invalid pixels are modified.

The value of {right arrow over (Z)}_(k)(p) for filling in the valid regions may be determined based on the inter position criterion: Suppose Z_(k)(p) and Z_(k)(p′) are similar to Z_(k′)(p) and Z_(k′)(p′) respectively, for two pixels p and p′ at two positions. Then,

Z _(k′,l)(p)=Z _(k′,l)(p′)

Z _(k,l)(p)=Z _(k,l)(p′)

if there is neither sensor noise nor electronic noise with both pairs of pixels.

For a pixel p ∈ C _(k), suppose that there exists another pixel p′ ∈ C_(k) such that Z_(k′,l)(p′) and Z_(k′,l)(p) are equal. According to the above inter pixel criterion, {right arrow over (Z)}_(k,l)(p) may be updated as Z_(k,l)(p′). In a situation having both sensor noise and electronic noise associated with both pairs of pixels, it is desired to reduce the effects of both types of noises.

According to an embodiment, an IMF based method may be provided to reduce the effect of the sensor noise. It is noted that there may exist a plurality of pixels in the region C_(k) that satisfy the above condition. The number of such pixels is denoted as ξ_(k,l)(p). The updated value {right arrow over (Z)}_(k)(p) may be determined in accordance with the following equation:

{right arrow over (Z)} _(k)(p)=Λ_(k′,k)(Z _(k′)(p))   (14)

Accordingly, an updated pixel {right arrow over (Z)}_(k)(p)=[{right arrow over (Z)}_(k,1)(p), {right arrow over (Z)}_(k,2)(p), {right arrow over (Z)}_(k,3)(p)]^(T) is synthesized by using Z_(k′)(p) and Λ_(k′,k)(z) in accordance with the equation (14).

The variances of noises can be reduced by factors of 1/√{square root over (ξ_(k,l)(p))} (l=1,2,3) in accordance with the embodiments above.

In another embodiment, the effect of electronic noise may be reduced by applying an average filter to {right arrow over (Z)}_(k)(p) using a plurality of neighboring pixels, wherein the plurality of neighboring pixels have been updated in accordance with equations (13) and (14) above. The average filter may be referred to as a spatial average filter, wherein {right arrow over (Z)}_(k)(p) determined according to equation (14) may be further filtered by a weighted filter as

$\begin{matrix} {{{\overset{\rightarrow}{Z}}_{k}(p)} = {\frac{{\overset{\rightarrow}{Z}}_{k}(p)}{2} + {\sum\limits_{i = 1}^{4}\frac{Z_{k^{\prime}}\left( p_{i} \right)}{8}}}} & (14) \end{matrix}$

wherein p_(i)(1≦i≦4) are four neighboring pixels of p in the reference image Z_(k′) that having been scanned and updated before the pixel p.

In another embodiment, the updated value {right arrow over (Z)}_(k)(p) may be reconstructed using pixels from the next image to be processed and the IMFs from the next image to be processed to the current image being processed, wherein the reference image Z_(k′) of the current image Z_(k) is used as the reference image to check whether the co-located pixel in the next image to be processed and Z_(k′)(p) are similar. If they are similar, the updated value {right arrow over (Z)}_(k)(p) can be constructed by mapping the co-located pixel from the next image to be processed to the current image Z_(k), based on an intensity mapping function from the next image to be processed to the current image Z_(k) similar to the embodiments above. This is a bi-directional reconstruction method.

According to the above embodiments, the image Z_(k) is updated at 240 by updating the values of each pixel classified to be invalid pixel, and accordingly the moving object is removed from the updated image Z_(k update). A sequence of updated LDR images 130 is output from the image updater 240, and is used for synthesis of an HDR image 160 according to FIG. 1.

In the above embodiments of updating the pixels of invalid regions, the spatial correlation among pixels in images Z_(k) and Z_(k′) is utilized. Different from the existing method wherein all invalid regions are filled in by pixels from a single selected image such that dynamic ranges of moving objects may be reduced, the above embodiments fill in invalid regions using pixel information from all LDR images. Since moving objects belong to invalid regions, the above embodiments may be applied to preserve the dynamic ranges of moving objects better when the inherent ranges of the moving objects are high. In addition, the above embodiments for image updating is fast in the sense that all pixels in image Z_(k) are only scanned once in the raster scan order.

According to the various embodiments described with regard to FIG. 2 above, an intensity based similarity index is provided by using the intensity mapping functions (IMFs) between two differently exposed images being compared. There are possibly large intensity changes between two co-located pixels due to different exposures and variation among pixels in an image caused by sensor and electronic noises. The IMFs between these two images are adopted to unify the intensities of co-located pixels in the two images and to reduce the effect of sensor noise. Meanwhile, a bi-directional mapping method is provided to reduce the effect of electronic noise. As a result, the similarity index determined in accordance with the embodiments is robust with respect to different exposures between the two images and the sensor and electronics noises in the two images.

The similarity index is applied to detect moving objects in a set of differently exposed LDR images. A pixel in an image is valid if the similarity between its reference pixel and itself is larger than a threshold, and is invalid otherwise. The threshold is adaptive to at least one of the intensity values of two pixels, the exposure times of two images, the ISO value for capturing the images and the average exposure value of all LDR images. This adaptive threshold of various embodiments is able to improve the robustness of the moving object detection scheme with respect to the sense and electronics noises. Since the correlation between two successive images is usually the strongest, after checking all pixels in the current image, the current image is updated and used as the reference image for the subsequent image. All valid pixels are adopted to update the current image.

An IMF based approach, together with a spatial average filter, is provided to synthesize pixels for the patching of invalid regions. The movement detection of the embodiments is robust with respect to different exposures of input images as well as the sensor and electronic noises in the input images. Moreover, a method is also provided to fill in invalid regions by using the spatial correlation among pixels in the current and reference images. All input images can be used to patch the invalid regions, instead of using only one input image as in existing methods. Therefore, the dynamic range of the final HDR image may be preserved better according to various embodiments.

The image processing method described in various embodiments above may be carried out by an image processing device.

FIG. 4 shows a schematic diagram of an image processing device according to various embodiments.

The image processing device 400 may be implemented by a computer system. In various embodiments, the decider, the similarity determiner, the threshold determiner, the moving object region determiner, the corresponding intensity value determiner and the updater may also be implemented as modules executing on one or more computer systems. The computer system may include a CPU 401 (central processing unit), a processor 403, a memory 405, a network interface 407, input interface/devices 409 and output interface/devices 411. All the components 401, 403, 405, 407, 409, 411 of the computer system 400 are connected and communicating with each other through a computer bus 413.

The memory 405 may be used as for storing images, similarity indexes, thresholds, pixels belonging to moving object regions, and updated images used and determined according to the method of the embodiments. The memory 405 may include more than one memory, such as RAM, ROM, EPROM, hard disk, etc. wherein some of the memories are used for storing data and programs and other memories are used as working memories.

In an embodiment, the memory 405 may be configured to store instructions for processing an image according to various embodiments above. The instructions, when executed by the CPU 401, may cause the CPU 401 to determine a similarity index, determine a threshold, determine a moving object region, determine a corresponding intensity value, and determine an updated intensity value. The instruction may also cause the CPU 401 to store similarity indexes, thresholds, pixels belonging to moving object regions, and updated images determined according to the method of the embodiments in the memory 405.

In another embodiment, the processor 403 may be a special purpose processor, in this example, a image processor, for executing the instructions described above.

The CPU 401 or the processor 403 may be used as the image processing device as described in various embodiments below, and may be connected to an internal network (e.g. a local area network (LAN) or a wide area network (WAN) within an organization) and/or an external network (e.g. the Internet) through the network interface 407.

The Input 409 may include a keyboard, a mouse, etc. The output 411 may include a display for display the images processed in the embodiments below.

The embodiments above may be combined with the method in “P. Debevec and J. Malik, Recovering high dynamic range radiance maps from photograph, In Proceedings SIGGRAPH 1997, pp. 369-378, 1997” for the synthesis of HDR images. The updated LDR images may be provided as the inputs of the method in “P. Debevec and J. Malik”, to produce an HDR image without any ghosting artifact.

In the following, the updated reference images are represented by {circumflex over (Z)}_(k)(1≦k≦n₀), and are used as the inputs of the method in“P. Debevec and J. Malik”.

The value of E(p) is computed by

$\begin{matrix} {{\log \left( {E(p)} \right)} = {\frac{\sum\limits_{k}{{w\left( {{\hat{Z}}_{k}(p)} \right)}\left( {{\log \left( {f^{- 1}\left( {{\hat{Z}}_{k}(p)} \right)} \right)} - {\log \left( {\Delta \; t_{k^{\prime})}} \right)}} \right)}}{\sum\limits_{k}{w\left( {{\hat{Z}}_{k}(p)} \right)}}.}} & (16) \end{matrix}$

Sufficient condition and necessary condition on the acceptable quality of the final HDR image may be derived by using all sets C_(k)'s as follows:

Proposition 1: The final synthesized HDR image is acceptable at pixel p if there exists a pixel Z_(k)(p) in the set C_(k) such that the following two Wyckoff signal/noise criteria (17) and (18) are satisfied for all color channel l.

ƒ_(t) ⁻¹(Z_(k,l)(p))>>η_(1,k,l)(p),   (17)

ω(Z_(k,l)(p))>>ω(η_(ƒ,k,l)(p)).   (18)

Proof: From equation (16), the value of E_(l)(p) may be computed by

${\log \left( {E_{l}(p)} \right)} = {\frac{\sum\limits_{k,{p \in C_{k^{\prime}}}}{{w\left( {Z_{k^{\prime},l}(p)} \right)}\left( {{\log \left( {f_{l}^{- 1}\left( {Z_{k^{\prime},l}(p)} \right)} \right)} - {\log \left( {\Delta \; t_{k^{\prime}}} \right)}} \right)}}{{\sum\limits_{k^{\prime},{p \in C_{k^{\prime}}}}{w\left( {Z_{k^{\prime},l}(p)} \right)}} + {\sum\limits_{k,{p \in C_{\tau {(k)}}}}{w\left( {{\overset{\rightarrow}{Z}}_{k^{\prime},l}(p)} \right)}}} + {\frac{\sum\limits_{k,{p \in {\overset{\_}{C}}_{k^{\prime}}}}{{w\left( {{\overset{\rightarrow}{Z}}_{k^{\prime},l}(p)} \right)}\left( {{\log \left( {f_{l}^{- 1}\left( {{\overset{\rightarrow}{Z}}_{k^{\prime},l}(p)} \right)} \right)} - {\log \left( {\Delta \; t_{k^{\prime}}} \right)}} \right)}}{{\sum\limits_{k,{p \in C_{k^{\prime}}}}{w\left( {Z_{k^{\prime},l}(p)} \right)}} + {\sum\limits_{k,{p \in C_{k}}}{w\left( {{\overset{\rightarrow}{Z}}_{k^{\prime},l}(p)} \right)}}}.}}$

It is shown from the inequalities (17) and (18) and the above equation that the final synthesized HDR image is acceptable at pixel p.

Proposition 2: The final synthesized HDR image is not acceptable at pixel p if all Z_(k)(p)'s (k≠k₀) are invalid and there exists a color channel l such that Z_(k) ₀ _(,l)(p) does not satisfy the inequalities (17) and (18).

Proof: Similar to the proof of Proposition 1, it is determined that

${\log \left( {E_{l}(p)} \right)} = {\frac{{w\left( {Z_{k_{0},l}(p)} \right)}\left( {{\log \left( {f_{l}^{- 1}\left( {Z_{k_{0},l}(p)} \right)} \right)} - {\log \left( {\Delta \; t_{k_{0}}} \right)}} \right)}{{w\left( {Z_{k_{0},l}(p)} \right)} + {\sum\limits_{k \neq k_{0}}{w\left( {{\overset{\rightarrow}{Z}}_{k}(p)} \right)}}} + {\frac{\sum\limits_{k \neq k_{0}}{{w\left( {{\overset{\rightarrow}{Z}}_{k}(p)} \right)}\left( {{\log \left( {f_{l}^{- 1}\left( {{\overset{\rightarrow}{Z}}_{k}(p)} \right)} \right)} - {\log \left( {\Delta \; t_{k}} \right)}} \right)}}{{w\left( {Z_{k_{0},l}(p)} \right)} + {\sum\limits_{k \neq k_{0}}{w\left( {{\overset{\rightarrow}{Z}}_{k}(p)} \right)}}}.}}$

Since Z_(k) ₀ _(,l)(p) does not satisfy the inequalities (17) and (18), the values of all {right arrow over (Z)}_(k)(p) (k≠k₀) are not reliable. Therefore, the final synthesized HDR image is not acceptable at pixel p.

According to the above embodiments, the moving object detection is independent of CRFs (camera response functions), and is thus robust with respect to the estimation error of CRFs. As shown in FIG. 1, The CRFs are estimated at 140 after the moving object is detected and removed from the LDR images 110. Accordingly, pixels with high similarity among the differently exposed LDR images are used to estimate the CRFs. Therefore, the estimated CRFs at 140 is more accurate.

In other embodiments, the various embodiments may be used to generate an HDR video. All images between two shot boundaries may be put together to form a group, and each image in the group may be selected as the initial reference image to generate the corresponding HDR image. Subsequently, an HDR video sequence is generated.

Experimental results are described in the following section. The image processing method according to various embodiments above is verified by using it to synthesize HDR images. The synthesized HDR images usually cannot be displayed directly by existing digital displaying system. To this end, tone mapping schemes were designed for the visualization of HDR images.

First, the method for similarity determination based on bi-directional mapping method is compared with the similarity determination based on the conventional uni-directional method. The testing sequence is composed of five images with movement in head and body of a girl as shown in FIG. 5, and the experimental results are shown in FIG. 6. FIG. 6( a) shows a HDR image synthesized using the bi-directional mapping method of the various embodiments, and FIG. 6( b) shows a HDR image synthesized using the uni-directional method. It can be seen from FIG. 6 that the bi-directional method can be used to improve the quality of bright parts in the synthesized HDR image.

The efficiency of the adaptive threshold according to various embodiments is evaluated by comparing with the situation in which the threshold is fixed as ¼. The testing sequence consists of seven images with movement in head and body of a man as illustrated in FIG. 7, and the experimental results are shown in FIG. 8. FIG. 8( a) shows the resulting image using the adaptive threshold of the embodiments, and FIG. 8( b) shows the resulting image using the fixed threshold of ¼. From FIG. 8, it is illustrated that using the adaptive threshold of the embodiments can remove ghosting artifacts in the area corresponding to the neck of the man, whereas using the fixed threshold cannot remove the ghosting artifacts in this area.

Proposition 2 above may be verified by testing the LDR image sequence in FIG. 5. An example of the verification is shown in FIG. 9. The basis image is selected as the first one. It is shown in FIG. 9 that the area in a box 901 in the synthesized HDR image is not acceptable.

The various embodiments described with regard to FIGS. 1 and 2 may also be applied to produce a HDR video. All images between two shot boundaries are put together to form a group. Each image in the group is selected as the initial reference image to generate the corresponding HDR image. Subsequently, an HDR video sequence is generated. Four of the HDR images synthesized based on the testing sequence of FIG. 7 are shown in FIG. 10.

The method of various embodiments is also compared with existing methods. The method of the embodiments is firstly compared with the schemes in “T. Grosch, Fast and robust high dynamic range image generation with camera and object movement, In Vision, Modeling and Visualization, pp. 277-284, 2006” and “K. Jacobs, C. Loscos, and G. Ward, Automatic high dynamic range image generation for dynamic scenes”, IEEE Computer Graphics and Applications, Vol. 128, No. 2, pp. 84-93, 2008”, by considering a numerical example with three input LDR images {Z₁, Z₂, Z₃}. Z₂ is selected as the initial reference image in the proposed scheme. Suppose that there are two clusters of pixels {Z₁(p₁), Z₂(p₁), Z₃(p₁)} {Z₁(p₂), Z₂(p₂), Z₃(p₂)} that are affected by movement in “T. Grosch” and “K. Jacobs”. The values of E₂(p₁) and E₃(p₁) are the same while the values of E₁(p₁) and E₂(p₁) are different. The value of E₁(p₂) and E₂(p₂) are the same while the values of E₂(p₂) and E₃(p₂) are different. With the method of the embodiments, Z₂(p₁) and Z₃(p₁) are marked as valid and Z₁(p₁) is marked as invalid. A new pixel, {right arrow over (Z)}₁(p₁), is reconstructed by using the correlation between images Z₁ and Z₂ and used to replace Z₁(p₁). Similarly, Z₂(p₂) and Z₁(p₂) are marked as valid and Z₃(p₂) is marked as invalid. A new pixel, {right arrow over (Z)}₃(p₂), is reconstructed to replace Z₃(p₂). By using the methods in “T. Grosch” and “K. Jacobs”, both clusters of pixels are marked as moving clusters and all pixels in a cluster are replaced by one of pixels in the cluster. It is seen that the dynamic range of the final HDR image is preserved better by using the method of the embodiments, compared with the schemes in “T. Grosch” and “K. Jacobs”.

The method of various embodiments is also compared with three commercial software FDRTools (htto://fdrtools.com/front_e.php), Photomatix (http://www.hdrsoft.com/) and Qtpfsgui (http://qtpfsgui.sourceforge.net/). The testing sequence is composed of 11 images with waiving leafs as demonstrated in FIG. 11. FIG. 12( a), (b), (c), (d) show the results of FDRTools, Photomatix, Qtpfsgui and the method of the embodiments, respectively. It is shown in the results in FIG. 12 that 1) ghosting artifacts, due to waving leafs, are not removed by using these commercial softwares, especially by Qtpfsgui; 2) the ghosting artifacts are removed via the method of the embodiments.

The method of the embodiments and Photomatix are further compared by testing the image sequence in FIG. 7. FIG. 13( a) shows the HDR image generated using Photomatix, and FIG. 13( b) shows the HDR image generated using the method of the embodiments. It is shown in FIG. 13 that the quality of the human subject is poor and his black cloth is not smooth by using the Photomatix, while the quality of the human subject is high by using the method of the embodiments.

According to the method of various embodiments, ghosting artifacts are removed from the final HDR image even though there are moving objects in a scene.

The movement detection according to various embodiments may be speed up via a sub-sampling method. In other words, instead of detecting moving objects in the original input images, the input images are first sampled by half at both horizontal and vertical directions. Moving objects are then detected on the sub-sampled images. Additional detection is conducted on the original input images if necessary. The movement detection of various embodiments may be used in various applications. For example, the movement detection of various embodiments, together with image inpainting, can be used to produce HDR videos without any reduction of frame rate.

While the invention has been particularly shown and described with reference to specific embodiments, it should be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. The scope of the invention is thus indicated by the appended claims and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced. 

1. A method for processing a first image based on a second image, each pixel in the first image having a plurality of color components and having a corresponding pixel in the second image, wherein each value of a color component in the first image corresponds to a value of a color component in the second image, the method comprising: deciding, for each color component of a pixel in the first image, whether to modify the value of the color component dependent on a predetermined criterion; and determining a similarity index between the pixel in the first image and the corresponding pixel in the second image based on, for each color component of the pixel, the value of the color component of the pixel, or if it is decided that the value of the color component of the pixel is to be modified, the corresponding value of the color component in the second image.
 2. The method of claim 1, wherein each pixel in the first image and its corresponding pixel in the second image are co-located.
 3. The method of claim 1, wherein the plurality of color components comprises a red color component, a green color component, and a blue color component.
 4. The method of claim 1, further comprising deciding, for each color component of the corresponding pixel in the second image, whether to modify the value of the color component of the corresponding pixel dependent on a predetermined criterion, wherein each value of a color component in the second image corresponds to a value of a color component in the first image; and determining the similarity index between the pixel in the first image and the corresponding pixel in the second image based on, for each color component of the corresponding pixel, the value of the color component of the corresponding pixel, or if it is decided that the value of the color component of the corresponding pixel is to be modified, the corresponding value of the color component in the first image.
 5. The method of claim 1, wherein deciding whether to modify the value of the color component is dependent on the value of the color component of the pixel in the first image and the value of the color component of the corresponding pixel in the second image.
 6. The method of claim 5, wherein deciding whether to modify the value of the color component is dependent on a comparison of an exposure level of the color component of the pixel in the first image with an exposure level of the color component of the corresponding pixel in the second image.
 7. The method of claim 6, wherein the exposure level of the color component of the pixel in the first image represents a deviation of the value of the color component of the pixel from a predetermined value, and the exposure level of the color component of the corresponding pixel in the second image represents a deviation of the value of the color component of the corresponding pixel from the predetermined value, wherein the predetermined value is a middle value of a value range of the first image and the second image.
 8. The method of claim 1, wherein the corresponding value of a color component in the second image is determined to correspond to the value of a color component in the first image based on an intensity mapping function from the first image to the second image, wherein the intensity mapping function is determined based on accumulated histograms of the first image and the second image.
 9. The method of claim 1, further comprising determining the pixel of the first image to be within or out of a moving object region dependent on the determined similarity index.
 10. (canceled)
 11. A method for processing a first image based on a second image, the first image and the second image being part of a sequence of images captured with different exposure time, the method comprising: determining a similarity index between a pixel of the first image and a corresponding pixel of the second image, the similarity index representing a degree of similarity between the pixel and the corresponding pixel; determining a threshold for the pixel dependent on at least one of exposure time of the first image, exposure time of the second image, a film speed for capturing the sequence of images, and an average exposure value of the sequence of images; and determining the pixel to be within or out of a moving object region dependent on a comparison of the determined similarity index with the determined threshold.
 12. The method of claim 11, further comprising determining the threshold for the pixel dependent on an intensity value of the pixel in the first image and an intensity value of the corresponding pixel in the second image.
 13. The method of claim 12, further comprising determining the threshold for the pixel dependent on an exposure level of the pixel in the first image and an exposure level of the corresponding pixel in the second image.
 14. The method of claim 13, wherein the exposure level of the pixel in the first image represents a deviation of the intensity value of the pixel from a predetermined value, and the exposure level of the corresponding pixel in the second image represents a deviation of the intensity value of the corresponding pixel from the predetermined value, wherein the predetermined value is a middle value of an intensity value range of the first image and the second image.
 15. The method of claim 11, wherein determining the similarity index between the pixel of the first image and the corresponding pixel of the second image comprises: deciding, for each color component of the pixel in the first image, whether to modify the value of the color component dependent on a predetermined criterion, wherein each value of a color component in the first image corresponds to a value of a color component in the second image; and determining the similarity index between the pixel in the first image and the corresponding pixel in the second image based on, for each color component of the pixel, the value of the color component of the pixel, or if it is decided that the value of the color component of the pixel is to be modified, the corresponding value of the color component in the second image.
 16. (canceled)
 17. A method for processing a first image based on a second image, the first image and the second image being part of a sequence of images captured with different exposure time, the method comprising: determining a similarity index between a pixel of the first image and a corresponding pixel of the second image, the similarity index representing a degree of similarity between the pixel and the corresponding pixel; determining a threshold for the pixel; determining the pixel to be within or out of a moving object region dependent on a comparison of the determined similarity index with the determined threshold; if the pixel is determined to be within the moving object region, determining a corresponding intensity value in the first image corresponding to an intensity value of the corresponding pixel in the second image or in a third image of the sequence of images based on an intensity mapping function from the second image or the third image to the first image, wherein the intensity mapping function is determined based on accumulated histograms of the first image and the second or the third image; if the pixel is determined to be within the moving object region, determining whether the corresponding pixel of the second image and the corresponding pixel of the third image is similar; if the corresponding pixel of the second image is not similar to the corresponding pixel of the third image, determining the corresponding intensity value in the first image based on an intensity mapping function from the second image to the first image; if the corresponding pixel of the second image is similar to the corresponding pixel of the third image, determining the corresponding intensity value in the first image based on an intensity mapping function from the third image to the first image; and determining an updated intensity value of the pixel in the first image to be the determined corresponding intensity value in the first image.
 18. The method of claim 17, wherein the corresponding intensity value in the first image and the updated intensity value of the pixel in the first image are determined for each color component of a plurality of color components of the pixel separately.
 19. The method of claim 17, wherein the intensity mapping functions comprise minimizing a difference between the accumulated histogram of the first image and the accumulated histogram of the second image or the third image, wherein the accumulated histogram of the first image represents a number of pixels in the first image having an intensity value equal to or less than the corresponding intensity value in the first image to be determined, the accumulated histogram of the second image represents a number of pixels in the second image having an intensity value equal to or less than the intensity value of the corresponding pixel in the second image, and the accumulated histogram of the third image represents a number of pixels in the third image having an intensity value equal to or less than the intensity value of the corresponding pixel in the third image.
 20. The method of claim 17, further comprising applying an average filter to the determined corresponding intensity value using a plurality of neighboring pixels, wherein intensity values of the plurality of neighboring pixels have been processed according to claim
 17. 21. The method of claim 17, wherein if the pixel is determined to be out of the moving object region, the updated intensity value of the pixel is determined to be the intensity value of the pixel.
 22. (canceled) 